home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / polyConvertMM.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  4.5 KB  |  137 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. // Copyright (C) 1997-2001 Alias|Wavefront,
  18. // a division of Silicon Graphics Limited.
  19. //
  20. // The information in this file is provided for the exclusive use of the
  21. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  22. // and incorporate this code into other products for purposes authorized
  23. // by the Alias|Wavefront license agreement, without fee.
  24. //
  25. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  26. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  27. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  28. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  29. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  30. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  31. // PERFORMANCE OF THIS SOFTWARE.
  32. //
  33. //  Alias|Wavefront Script File
  34. //  MODIFY THIS AT YOUR OWN RISK
  35. //
  36. //  Creation Date:  11 January 2002
  37. //
  38. //  Procedure Name:
  39. //      polyConvertMM
  40. //
  41. //  Description:
  42. //      This procedure creates the popup/marking menu
  43. //      for poly component conversion. See buildConvertMM.
  44. //
  45. //  Input Arguments:
  46. //      The parent item to parent the popup menu to.
  47. //
  48. //  Return Value:
  49. //      None.
  50.  
  51.  
  52. global proc polyConvertMM(string $parent){
  53.     
  54.     if (`popupMenu -query -exists $parent`){
  55.         popupMenu -edit -deleteAllItems $parent;
  56.         
  57.         setParent -menu $parent;
  58.         
  59.         menuItem
  60.             -label "To Edges" 
  61.             -command ("ConvertSelectionToEdges;" +
  62.                 "hilite; selectType -ocm -alc false;" +
  63.                 "selectType -ocm -polymeshEdge true;")
  64.             -radialPosition "N" 
  65.             -annotation (getRunTimeCommandAnnotation ("ConvertSelectionToEdges"))
  66.             ;
  67.         
  68.         menuItem
  69.             -label "Shrink Selection" 
  70.             -command "ShrinkPolygonSelectionRegion" 
  71.             -radialPosition "NW" 
  72.             -annotation (getRunTimeCommandAnnotation ("ShrinkPolygonSelectionRegion"))
  73.             ;
  74.         
  75.         menuItem
  76.             -label "To UVs" 
  77.             -command ("ConvertSelectionToUVs;" +
  78.                 "hilite; selectType -ocm -alc false;" +
  79.                 "selectType -ocm -polymeshUV true;")
  80.             -radialPosition "E" 
  81.             -annotation (getRunTimeCommandAnnotation ("ConvertSelectionToUVs"))
  82.             ;
  83.         
  84.         menuItem
  85.             -label "Select Contiguous Edges" 
  86.             -command "SelectContiguousEdges" 
  87.             -radialPosition "SE" 
  88.             -annotation (getRunTimeCommandAnnotation ("SelectContiguousEdges"))
  89.             ;
  90.  
  91.         menuItem -optionBox true
  92.             -command "SelectContiguousEdgesOptions"
  93.             -annotation (getRunTimeCommandAnnotation ("SelectContiguousEdgesOptions"))
  94.             ;
  95.         
  96.         menuItem
  97.             -label "To Faces" 
  98.             -command ("ConvertSelectionToFaces;" +
  99.                 "hilite; selectType -ocm -alc false;" +
  100.                 "selectType -ocm -polymeshFace true;")
  101.             -radialPosition "S" 
  102.             -annotation (getRunTimeCommandAnnotation ("ConvertSelectionToFaces"))
  103.             ;
  104.         
  105.         menuItem
  106.             -label "Selection Boundary" 
  107.             -command "SelectPolygonSelectionBoundary" 
  108.             -radialPosition "SW" 
  109.             -annotation (getRunTimeCommandAnnotation ("SelectPolygonSelectionBoundary"))
  110.             ;
  111.         
  112.         menuItem
  113.             -label "To Vertices" 
  114.             -command ("ConvertSelectionToVertices;" +
  115.                 "hilite;    selectType -ocm -alc false;" +
  116.                 "selectType -ocm -polymeshVertex true;") 
  117.             -radialPosition "W" 
  118.             -annotation (getRunTimeCommandAnnotation ("ConvertSelectionToVertices"))
  119.             ;
  120.         
  121.         menuItem
  122.             -label "Grow Selection" 
  123.             -command "GrowPolygonSelectionRegion" 
  124.             -radialPosition "NE" 
  125.             -annotation (getRunTimeCommandAnnotation ("GrowPolygonSelectionRegion"))
  126.             ;
  127.         
  128.         menuItem
  129.             -label "Selection Constraints..." 
  130.             -command "PolygonSelectionConstraints" 
  131.             -annotation (getRunTimeCommandAnnotation ("PolygonSelectionConstraints"))
  132.             ;
  133.         
  134.         setParent -menu ..;
  135.     }
  136. }
  137.